<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>Evolution | 管理系统</title>
    <link rel="stylesheet" href="{{asset('/backend/static/admin/layuiadmin/layui/css/layui.css')}}" media="all">
    <link rel="stylesheet" href="{{asset('/backend/static/admin/layuiadmin/style/admin.css')}}" media="all">
    <link rel="stylesheet" href="{{asset('/backend/static/admin/layuiadmin/style/treetable.css')}}" media="all">
    <link rel="stylesheet" href="{{asset('/backend/static/admin/layuiadmin/style/dtree.css')}}" media="all">
    <link rel="stylesheet" href="{{asset('/backend/static/admin/layuiadmin/style/font/dtreefont.css')}}" media="all">
    @yield('styles')
</head>

<body>
    <div class="layui-fluid">
        @yield('content')
    </div>

    <script type="text/javascript" src="{{asset('/backend/js/jquery.min.js')}}"></script>
    <script type="text/javascript" src="{{asset('/backend/js/socket.io.js')}}"></script>
    <script type="text/javascript" src="{{asset('/backend/static/admin/layuiadmin/layui/layui.js')}}"></script>
    <script type="text/javascript">
        $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
        });
        layui.config({
            base: '/backend/static/admin/layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['element', 'form', 'layer', 'table', 'upload', 'laydate'], function () {
            var element = layui.element;
            var layer = layui.layer;
            var form = layui.form;
            var table = layui.table;
            var upload = layui.upload;
            var laydate = layui.laydate;
            //错误提示
            @if(count($errors) > 0)
            @foreach($errors->all() as $error)
            layer.msg("{{$error}}", {
                icon: 5
            });
            @break
            @endforeach
            @endif
            //信息提示
            @if(session('status'))
            layer.msg("{{session('status')}}", {
                icon: 6
            });
            @endif
        });

    </script>
    @yield('script')
</body>

</html>
